package com.lilinling.yinzhi.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lilinling.common.utils.PageUtils;
import com.lilinling.yinzhi.user.entity.UserEntity;
import com.lilinling.yinzhi.user.exception.AccountExsitException;
import com.lilinling.yinzhi.user.exception.EmailExsitException;
import com.lilinling.yinzhi.user.exception.MobileExsitException;
import com.lilinling.yinzhi.user.exception.NicknameExsitException;
import com.lilinling.yinzhi.user.vo.UserLoginVo;
import com.lilinling.yinzhi.user.vo.UserRegisterVo;

import javax.validation.Valid;
import java.util.Map;

/**
 * 用户
 *
 * @author lichenglin
 * @email lilinling15@gmail.com
 * @date 2021-01-19 22:19:29
 */
public interface UserService extends IService<UserEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void checkEmailUnique(String email) throws EmailExsitException;
    void checkAccountUnique(String account) throws AccountExsitException;
    void checkNicknameUnique(String nickname) throws NicknameExsitException;
    void checkMobileUnique(String mobile) throws MobileExsitException;


    void register(@Valid UserRegisterVo userRegisterVo);

    String login(@Valid UserLoginVo vo);


}

